<?php
namespace Transform;

class BookTransform extends Transform
{
   public function listview()
    {
        return [
            'allows' => ['id', 'tid', 'name', 'title', 'img', 'num','views', 'state', 'sex', 'content','author','bookinfo','comment','shelves','free_time','gold','free_chapter','totalwords'],
            'bookinfo'=>['trans' => ['name' => 'Book', 'method' => 'bookchapter']],
            'comment'=>['trans' => ['name' => 'Book', 'method' => 'commentinfo']],
        ];
    }

    public function bookchapter()
    {
       return [
           'allows'=>['id', 'title2','pay','gold','number','time']
       ];
    }
    
    public function content()
    {
       return [
           'allows'=>['id', 'title2','pay','gold','number','content']
       ];
    }
    
    public function commentinfo()
    {
       return [
           'allows'=>['nickname','img','user_id','vip','comment_id','content','add_time']
       ];
    }
    public function freedays()
    {
       return [
           'allows'=>['id','img','content','end_time','state','author','name']
       ];
    }
    
   
}
